#pragma once
#include <wx/wx.h>
#include <wx/wxsqlite3.h>
#include <wx/arrstr.h>

#include "common.h"
#include "dictdb.h"

class DictDBQuery {
    public:
        DictDBQuery();
        
        bool open(const wxString& dictdb_path);
        
        bool query_dict(int w_id, wxArrayString& appendaer);
        bool query_word(const wxString& word, wxArrayString& words, int limit);
        bool query_expl(int w_id, int d_id, wxArrayString& appendaer);
        
        bool get_dict_info(int d_id, DictInfo& dictinfo);
        
        virtual ~DictDBQuery();
        
    protected:
        wxSQLite3Database _dictdb;
};
